<template>
	<div>
    <comA @ha="clickA" :height="height"></comA>
    <comB @hb="clickB" @toA="toABus" :height="height"></comB>
	</div>
</template>


<script type="text/javascript">
  import comA from '@/components/comA'
  import comB from '@/components/comB'


	export default {
		name:"TestCommunication",
		components:{comA,comB},
		data(){
			return {
				height:"110px"
			}
		},
		mounted(){
			this.height="120px"
		},
		methods:{
			clickA:function(d){
				console.log(d);
			},
			clickB:function(d){
				console.log(d);
			},
			//中转
			toABus(d){
				console.log(d);
				this.height=d;
			}
		}
	}
</script>